// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : MultiServerEngine | ServerFramework | ParameterMap.cs
// //  Created : 2016 - 02 - 19 14:00
// //  Modified: 2016 - 02 - 20 12:32
// //  ********************************************************************************

using FluentNHibernate.Mapping;
using ServerFramework.Implementation.Database.Domain;

namespace ServerFramework.Implementation.Database.Mapping
{
    public class ParameterMap : ClassMap<Parameter_T>
    {
        public ParameterMap()
        {
            Schema("mseconfig");
            Table("parameters");
            CompositeId().KeyProperty(x => x.Parkompgrp, "PARKOMPGRP")
                .KeyProperty(x => x.Pargrp, "PARGRP")
                .KeyProperty(x => x.Parkey, "PARKEY");
            Map(x => x.Parvalue).Column("PARVALUE").Not.Nullable();
            Map(x => x.Parvaluemin).Column("PARVALUEMIN");
            Map(x => x.Parvaluemax).Column("PARVALUEMAX");
            Map(x => x.Pardescription).Column("PARDESCRIPTION");
            Map(x => x.Parinfo).Column("PARINFO");
            Map(x => x.Dtins).Column("DTINS").Not.Nullable();
            Map(x => x.Dtupd).Column("DTUPD").Not.Nullable();
            Map(x => x.Namupd).Column("NAMUPD").Not.Nullable();
            Map(x => x.Tsn).Column("TSN").Not.Nullable();
        }
    }
}
